cmake_minimum_required(VERSION 3.19)

project("sdb" LANGUAGES CXX ASM)

find_package(PkgConfig REQUIRED)
pkg_check_modules(libedit REQUIRED IMPORTED_TARGET libedit)
find_package(fmt CONFIG REQUIRED)
find_package(zydis CONFIG REQUIRED)

include(CTest) 

add_subdirectory("src") 
add_subdirectory("tools")


# 通过 -DBUILD_TESTING=ON 构建测试部分，用Catch2测试框架
if(BUILD_TESTING)
    find_package(Catch2 CONFIG REQUIRED)
    add_subdirectory ("test")
endif()